package com.text.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/ccc")
public class HelloCtrl {
    @ResponseBody
    //返回下面的内容显示到网页
    @RequestMapping(value = "/ccc",method = {RequestMethod.GET,RequestMethod.POST})
    public String toHello(){
        return "Hello Spring Boot";
    }

    @ResponseBody
    @GetMapping("/bb")
    public String toHello2(){
        return "Hello";
    }
}
